<script lang="ts">
    import { useClassList } from "../utils/useClassList";
    import type { TimelineProps } from "./Timeline";

    const props: TimelineProps = $props();

    const classList = $derived(
        useClassList(props, "cm-timeline", {
            [`cm-timeline-${props.mode}`]: props.mode,
        }),
    );
</script>

<div class={classList} style={props.style}>
    {@render props.children?.()}
</div>
